package com.dgut.smart_house.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface ControlMapper {
    /**
     * 开设备
     * @param devId
     */
    @Update("update user_device set status=1 where dev_id=#{devId}")
    public void openDevice(int devId);

    /**
     * 关设备
     * @param devId
     */
    @Update("update user_device set status=0 where dev_id=#{devId}")
    public void closeDevice(int devId);



}
